﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Admin_photoClass.aspx.cs" Inherits="Master_Admin_photoClass" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="Css/Css.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="Form1" runat="server">
    <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border" align="center">
        <tr>
            <td colspan="2" align="center" class="title">
                <strong>图 片 分 类 管 理</strong>
            </td>
        </tr>
        <tr class="tdbg">
            <td width="70" height="30">
                <strong>管理导航：</strong>
            </td>
            <td height="30">
                <a href="Admin_photoClassAdd.aspx">添加分类</a>&nbsp;|&nbsp;<a href="Admin_photoClass.aspx">所有分类</a>&nbsp;|&nbsp;<a
                    href="Admin_photoAdd.aspx">添加图片</a>&nbsp;|<a href="Admin_photolist.aspx?Action=my">我添加的图片</a>&nbsp;|&nbsp;<a
                        href="Admin_photolist.aspx">所有图片</a>&nbsp;|&nbsp;<a href="Admin_photolist.aspx?Action=check">审核图片</a>
            </td>
        </tr>
    </table>
        <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
        <tr class="tdbg" style="padding: 0px 2px;">
                        <td align="center" colspan="4" > 
                        
                         <asp:GridView ID="GridView1" DataKeyNames="id" runat="server" AutoGenerateColumns="False" 
                                Width="100%" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" 
                                BorderWidth="0px" CellPadding="4" ForeColor="Black" GridLines="Horizontal" 
                                onrowediting="GridView1_RowEditing" 
                                onrowcancelingedit="GridView1_RowCancelingEdit" 
                                onrowupdating="GridView1_RowUpdating" 
                                onrowdatabound="GridView1_RowDataBound" 
                                onrowdeleting="GridView1_RowDeleting" >
                <Columns>
                    <asp:TemplateField HeaderText="分类名称">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                        <EditItemTemplate>
                            <asp:HiddenField ID="Txt_hid" Value='<%#Eval("id") %>' runat="server" />
                            <asp:TextBox ID="Txt_ClasName" Text='<%#Eval("ClassName") %>' runat="server"></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <%#Eval("ClassName") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="说明">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                         <EditItemTemplate>
                             <asp:TextBox ID="Txt_Readme" Text='<%#Eval("Readme") %>' Width="301" Height="80" TextMode="MultiLine" runat="server"></asp:TextBox>
                        </EditItemTemplate>
                         <ItemTemplate>
                            <%#Eval("Readme") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="添加时间">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                         <ItemTemplate>
                            <%#Eval("Addtime","{0:yyyy-MM-dd}") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作">
                        <EditItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" 
                                CommandName="Update" Text="更新"></asp:LinkButton>
                            &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                                CommandName="Cancel" Text="取消"></asp:LinkButton>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                                CommandName="Edit" Text="编辑"></asp:LinkButton>
                            &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False"  OnClientClick="return confirm('是否真的删除当前分类,您将删除当前分类下所有图片内容');"
                                CommandName="Delete" Text="删除"></asp:LinkButton>                          
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                    <center>暂无分类数据</center>
                </EmptyDataTemplate>
                
                             <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                             <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                             <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                             <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
               
            </asp:GridView>          
                        
                        
                        
                        </td>
          </tr>
        </table>
    </form>
</body>
</html>
